package com.mzj.saas.mservice.excel.controller;

import com.mzj.saas.mservice.excel.service.ExcelService;
import com.mzj.saas.mservice.excel.vo.ExcelTemplateVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@Controller
@RequestMapping("/excel")
public class ExcelController {
    @Autowired
    private ExcelService excelService;

    @GetMapping(value = "/word")
    @ResponseBody
    public void exportInfo(ExcelTemplateVo vo, HttpServletResponse response) throws IOException {
        excelService.exportTemplateExcel(vo, response);
    }
}
